package com.itheima.controller;

import com.itheima.pojo.Emp;
import com.itheima.pojo.Result;
import com.itheima.pojo.User;
import com.itheima.service.EmpService;
import com.itheima.service.RegistService;
import com.itheima.utils.JwtUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
@RestController
@Slf4j
public class RegistController {
    @Autowired
    private RegistService registService;

    @PostMapping("/regist")
    public Result regist(@RequestBody User user){
        log.info("新增用户:{}",user);
        registService.add(user);

        return Result.success();
    }

}
